module.exports = app => {
  const { INTEGER,STRING } = app.Sequelize;
  const UserInfo = app.model.define("user_info", {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    address: STRING,
    phone: STRING,
    name:STRING,
  });

  UserInfo.associate = function () {
    app.model.UserInfo.belongsTo(app.model.User, {
      foreignKey: "user_id",
      as: "userId"
    });
  };

  return UserInfo;
};
